package com.gitee.cirnochat.chatai.model.vo.resp;


import com.gitee.cirnochat.chatai.model.dto.lke.LkeReplyResponse;
import com.gitee.cirnochat.chatai.model.enums.aimessage.ChatRoleType;
import com.gitee.cirnochat.chatai.model.enums.aimessage.MessageType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@Data
@Schema(description = "AI消息流对象")
@AllArgsConstructor
@NoArgsConstructor
public class AIStreamMessageVo implements Serializable {
    @Schema(description = "消息id")
    private Long id;
    @Schema(description = "会话ID")
    private Long sessionId;
    @Schema(description = "模型")
    private String model;
    @Schema(description = "角色")
    private ChatRoleType role;
    @Schema(description = "内容")
    private String content;
    @Schema(description = "消息类型")
    private MessageType messageType;

    public AIStreamMessageVo(LkeReplyResponse chunk) {
        BeanUtils.copyProperties(chunk, this);
    }
}

